package cn.wolfcode.controller;

import cn.wolfcode.domain.ScenicSpot;
import cn.wolfcode.query.ScenicSpotQueryObject;
import cn.wolfcode.service.IScenicSpotService;
import cn.wolfcode.util.JsonResult;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 景点控制器类
 * @Author: 伍家钰
 * @Date: 2020/8/12 19:16
 * @Version: 1.0
 */
@RestController
@RequestMapping("/scenicSpots")
public class ScenicSpotController {
    @Resource
    private IScenicSpotService scenicSpotService;

    @GetMapping("list")
    public Object list() {
        List<ScenicSpot> list = scenicSpotService.list();
        return list;
    }
}
